﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Me.Practice.ElevatorEngine.Configuration
{
    public class BuildingConfigurationSection
        : ConfigurationSection
    {
        [ConfigurationProperty("floorCount")]
        public int FloorCount
        {
            get { return (int) this["floorCount"]; }
        }

        [ConfigurationProperty("name")]
        public string Name
        {
            get { return this["name"] as string; }
        }

        [ConfigurationProperty("address")]
        public string Address
        {
            get { return this["address"] as string; }
        }

        [ConfigurationProperty("elevators")]
        public ElevatorConfigurationElementCollection Elevators
        {
            get { return (ElevatorConfigurationElementCollection)this["elevators"]; }
        }
    }
}
